﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace GrainManage.Data.Service
{
    public class WeatherService : BaseService
    {
        public WeatherService(GrainManage.Data.Access.AccessBase proc) : base(proc) { }

        public string GetPinyinByName(string name, bool allowUpward)
        {
            return Proc.ExecuteScalar(ProcConst.Weather_GetPinyinByName, name, allowUpward) as string;
        }

        public string GetParentPinyinByName(string name)
        {
            return Proc.ExecuteScalar(ProcConst.Weather_GetParentPinyinByName, name) as string;
        }

        public string GetCodeByName(string name)
        {
            return Proc.ExecuteScalar(ProcConst.Weather_GetCodeByName, name) as string;
        }

        public DataSet GetAllByName(string name)
        {
            return Proc.ExecuteQuery(ProcConst.Weather_GetAllByName, name);
        }

        public DataSet GetChildByCity(string city)
        {
            return Proc.ExecuteQuery(ProcConst.Weather_GetChildByCity, city);
        }
    }
}
